When capturing an image using an image-capturing device, a focus distance for the capturing of the image is determined either manually or using an autofocus function. The focus distance is the distance from the image-capturing device to an object in the scene, where a user of the image-capturing device desires that the object in the scene have a higher degree of sharpness when compared to other objects in the scene. The captured image (or the object of focus in the captured image) may be blurry (or a captured stream of images or video may be shaky) because of the shaking of the image-capturing device at the instant when the image is captured. The shaking may be caused by the movement of the user's fingers or other body parts that are in contact with the image-capturing device at the moment when the image is captured. Additionally, the captured image or the object of focus in the captured image may be blurry because the object may have moved at the instant when the image is captured.
What is needed is a system to reduce or substantially eliminate the blurriness in a captured image or the shakiness in a captured video.